from django.db import models

# Create your models here.


class DataTooldoortime(models.Model):
    timestamp = models.DateTimeField(primary_key=True)  # The composite primary key (timestamp, EndpointNum) found, that is not supported. The first column is selected.
    endpointnum = models.CharField(db_column='EndpointNum', max_length=255)  # Field name made lowercase.
    assetnum = models.CharField(db_column='AssetNum', max_length=255, blank=True, null=True)  # Field name made lowercase.
    data = models.FloatField(db_column='Data')  # Field name made lowercase.
    discription = models.CharField(db_column='Discription', max_length=255, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'data_tooldoortime'
        unique_together = (('timestamp', 'endpointnum'),)